package qwfws

type AuthCorpInfo struct {
	Corpid            string `json:"corpid"`
	CorpName          string `json:"corp_name"`
	CorpType          string `json:"corp_type"`
	CorpSquareLogoUrl string `json:"corp_square_logo_url"`
	CorpUserMax       int    `json:"corp_user_max"`
	CorpAgentMax      int    `json:"corp_agent_max"`
	CorpFullName      string `json:"corp_full_name"`
	VerifiedEndTime   int    `json:"verified_end_time"`
	SubjectType       int    `json:"subject_type"`
	CorpWxqrcode      string `json:"corp_wxqrcode"`
	CorpScale         string `json:"corp_scale"`
	CorpIndustry      string `json:"corp_industry"`
	CorpSubIndustry   string `json:"corp_sub_industry"`
	Location          string `json:"location"`
}

type AuthAgent struct {
	Agentid       int64              `json:"agentid"`
	Name          string             `json:"name"`
	RoundLogoUrl  string             `json:"round_logo_url"`
	SquareLogoUrl string             `json:"square_logo_url"`
	Appid         int64              `json:"appid"`
	Privilege     AuthAgentPrivilege `json:"privilege,omitempty"`
}

type AuthAgentPrivilege struct {
	Level      int      `json:"level"`
	AllowParty []int    `json:"allow_party"`
	AllowUser  []string `json:"allow_user"`
	AllowTag   []int    `json:"allow_tag"`
	ExtraParty []int    `json:"extra_party"`
	ExtraUser  []string `json:"extra_user"`
	ExtraTag   []int    `json:"extra_tag"`
}

type AuthUserInfo struct {
	Userid string `json:"userid"`
	Name   string `json:"name"`
	Avatar string `json:"avatar"`
}

type PermanentCodeResult struct {
	Errcode       int          `json:"errcode"`
	Errmsg        string       `json:"errmsg"`
	AccessToken   string       `json:"access_token"`
	ExpiresIn     int          `json:"expires_in"`
	PermanentCode string       `json:"permanent_code"`
	AuthCorpInfo  AuthCorpInfo `json:"auth_corp_info"`
	AuthInfo      struct {
		Agent []AuthAgent `json:"agent"`
	} `json:"auth_info"`
	AuthUserInfo AuthUserInfo `json:"auth_user_info"`
}

type AuthInfoResult struct {
	Errcode      int          `json:"errcode"`
	Errmsg       string       `json:"errmsg"`
	AuthCorpInfo AuthCorpInfo `json:"auth_corp_info"`
	AuthInfo     struct {
		Agent []AuthAgent `json:"agent"`
	} `json:"auth_info"`
}
